<?php


class Comment extends ORM_Table {
    static protected $table_name = 'comment';
    
    static public function getTableName($params = null) {
        //$table_name = self::$table_name.substr($params['article_type_id'], 0, 1);
        return self::$table_name;
    }

    public function getContent() {
        $content = strip_tags($this->field['content']);
        return $content;
    }
    
    static public function getCommentByArticleId($id) {
        $articles = ORM_Finder::find('Comment', 'article_id IN ('.join(',', $id).')', '*', 'created_at DESC');
        return $articles;
    }
}

